<?php $this->header(); ?>
<div class="wrap">

    <!-- start -->
    <div class="nav">
        <ul class="cc">
            <li class="current"><a href="<?php echo $func->url('Admin-Model-index'); ?>">模型列表</a></li>
        </ul>
    </div>
    <div class="h_a">PG家长指引</div>
    <div class="mb10 prompt_text">
        <ol>
            <li><font color="red">本页面涉及系统数据设置，非专业人士勿随便进行任何操作!</font></li>
        </ol>
    </div>
    <div class="table_list">
        <table width="100%" id="J_table_list" style="table-layout:fixed;">
            <colgroup>
                <col width="30">
                <col width="150">
                <col width="150">
                <col width="150">
                <col width="150">
            </colgroup>
            <thead>
                <tr>
                    <td></td>
                    <td>模型名称</td>
                    <td>模型值名</td>
                    <td>状态</td>
                    <td>操作</td>
                </tr>
            </thead>
            <?php foreach ($list as $key => $value): ?>
                <tr>
                    <td><span class="away_icon"></span></td>
                    <td>
                        <?php echo $value['name'] ?>
                    </td>
                    <td>
                        <?php echo $value['model_name']; ?>
                    </td>
                    <td>
                        <?php echo $func->status($value['status']); ?>
                    </td>

                    <td>

                        <a href="<?php echo $func->url('Admin-Model-field', array('model_id' => $value['id'])); ?>" class="mr10 btn btn_submit"  title="编辑">字段管理</a>
                        <a href="javascript:void(0);" class="mr10 btn btn_submit"  title="编辑">编辑</a>
                        <a href="<?php echo $func->url('Admin-Model-deleteModel', array('model_id' => $value['id'])); ?>" onclick="return deleteWarning(this)" class="mr10 btn btn_submit"  >删除</a>
                    </td>
                </tr>
            <?php endforeach; ?>
        </table>

        <table width="100%">
            <tr class="ct">
                <td><a href="javascript:void(0);" onclick="addModel()" class="link_add ">添加模型</a></td>
            </tr>
        </table>

    </div>

    <!-- end -->

</div>
<div class="pop_cont pop_table" id="editModel"  style="display: none;">
    <table width="100%" style="table-layout:fixed;">
        <colgroup><col width="80">
            <col>
        </colgroup>
        <tr>
            <th>模型名称</th>
            <td>
                <span class="must_red">*</span>
                <input type="text" name="model_name" class="input input_hd length_5">
            </td>
        </tr>
        <tr>
            <th>中文名称</th>
            <td>
                <span class="must_red">*</span>
                <input type="text" name="name" class="input input_hd length_5">
            </td>
        </tr>
        <tr>
            <th>搜索设置</th>
            <td>
                <span class="must_red">*</span>
                <label><input type="radio" name="is_search" value="1" checked="checked"  >允许</label>
                <label><input type="radio" name="is_search" value="0" >拒绝</label>
            </td>
        </tr>
        <tr>
            <th>状态</th>
            <td>
                <span class="must_red">*</span>
                <label><input type="radio" name="status" value="1" checked="checked"  >启用</label>
                <label><input type="radio" name="status" value="0" >禁用</label>
            </td>
        </tr>
        <tr>
            <th>顺序</th>
            <td>
                <input type="text" name="listsort" class="input length_5">
            </td>
        </tr>
    </table>
</div>
<?php $this->footer(); ?>